<?php $ui = $this->load->library('Ui'); ?>
    <h2>Add a User</h2>
	<?php
		$header = 	$ui->makeOption('<a href="#" rel="#overlay">Get Help With This Page</a>' . ' '.
					anchor('user/admin', 'Manage Users') . ' '.
					anchor('user/admin/add', 'Add a User'). ' ', 1 ).
					'<div class="clear"></div>';
		$content = '	<form method="POST">
		<table class="hidden-table" cellspacing="1" cellpadding="5" width="100%">
			<tr><td width="130">Username: </td><td><input type="text" name="user_username" class="form" value="'.set_value('user_username').'" /></td><td>'.form_error('user_username').'</td></tr>
			<tr><td>Display Name: </td><td><input type="text" name="display_name" class="form" value="'.set_value('display_name').'" /></td><td>'.form_error('display_name').'</td></tr>
            <tr><td>Password: </td><td><input type="password" name="user_password" class="form" value="'.set_value('user_password').'" /></td><td>'.form_error('user_password').'</td></tr>
			<tr><td>Password again: </td><td><input type="password" name="user_password2" class="form" value="'.set_value('user_password2').'" /></td><td>'.form_error('user_password2').'</td></tr>
			<tr><td>Email: </td><td><input type="text" name="user_email" class="form" value="'.set_value('user_email').'" /></td><td>'.form_error('user_email').'</td></tr>
			<tr><td>Group: </td><td><select name="user_group">';
				foreach($group as $var => $value){
					$content .= '<option value="'.$value['id'].'">'.$value['title'].'</option>';
				}
			$content .= '</select></td><td></td</tr><tr><td colspan="3"><input type="submit" name="user_add" value="Add User" /></td></tr></table></form></div>';
		
		
		echo $ui->makeDialog('Add a User'.$header, $content, 'maximize center');
	?>

<div class="overlay" id="overlay">

    <!-- here is the content for overlay, can be anything -->
    <h2 style="margin:10px 0">Help! <em>Using the Add User feature.</em></h2>

    <p>
            <strong>Username</strong><br />
            <span class="help">The username that the new user will use to login to the system. Should be Lowercase Alpha-Numeric with hyphens for spaces</span><br /><br />
            <strong>Display Name</strong><br />
            <span class="help">A name to be displayed within the site, for example, someones full name. It can Be alpha-numeric and contain dashes or underscores.</span><br /><br />
            <strong>Password</strong><br />
            <span class="help">The password the user will sue to login to the site. The password can be made up of letters, numbers and symbols.</span><br /><br />
            <strong>Password Again</strong><br />
            <span class="help">Re-Enter the password to help prevent a mistake being made.</span><br /><br />
            <strong>Email</strong><br />
            <span class="help">The users email.</span><br /><br />
            <strong>Group</strong><br />
            <span class="help">The group that you want to add the new user too.</span><br /><br />
</p>

</div>
